#עתי import turtle, random , time screen = turtle.Screen() screen.setup(400,400) screen.bgpic("download2.jpg") char3 = turtle.Turtle() screen.addshape("papa.png") char3.shape("papa.png") char3.left(90) char3.penup() maza = turtle.Turtle() screen.addshape("aficoman1.png") maza.shape("aficoman1.png") maza.left(90) maza.penup() maza.ht() maza1 = turtle.Turtle() screen.addshape("aficoman1.png") maza1.shape("aficoman1.png") maza1.left(90) maza1.penup() maza1.ht() maza2 = turtle.Turtle() screen.addshape("aficoman1.png") maza2.shape("aficoman1.png") maza2.left(90) maza2.penup() maza2.ht() maza3 = turtle.Turtle() screen.addshape("aficoman1.png") maza3.shape("aficoman1.png") maza3.left(90) maza3.penup() maza3.ht() char3.goto(-100,0) char3.write(("לתפוס את האפיקומן "), font=("ariel",30,"bold")) time.sleep(1.5) char3.goto(-250,-150) char3.clear() start= turtle.Turtle() start.penup() start.hideturtle() start.color("yellow") start.write(("3"), font=("arial",50,"bold")) time.sleep(0.6) start.clear() start.write(("2"), font=("arial",50,"bold")) time.sleep(0.6) start.clear() start.write(("1"), font=("arial",50,"bold")) time.sleep(0.6) start.clear() start.setx(-100) start.write(("צא לדרך"), font=("arial",50,"bold")) time.sleep(0.6) start.clear() # דמות נתפסת char1 = turtle.Turtle() screen.addshape("aficoman.png") char1.shape("aficoman.png") #דמות תופסת char2 = turtle.Turtle() screen.addshape("child.png") char2.shape("child.png") char1.left(90) char1.penup() char2.left(90) char2.penup() def clickpostion(x,y): char2.goto(x,y) screen.onclick(clickpostion) t=9 score = 0 scorepro= turtle.Turtle() scorepro.color("blue") scorepro.penup() scorepro.hideturtle() scorepro.speed(0) scorepro.goto(-155,160) atay= turtle.Turtle() atay.color("blue") atay.penup() atay.hideturtle() atay.speed(0) atay.goto(-120,160) while 1: if t==9: x=random.randint(-180,180) y=random.randint(-180,180) x1=random.randint(-180,180) y1=random.randint(-180,180) x2=random.randint(-180,180) y2=random.randint(-180,180) x3=random.randint(-180,180) y3=random.randint(-180,180) x4=random.randint(-180,180) y4=random.randint(-180,180) char1.goto(x,y) char2.clear() time.sleep(0.8) if char1.distance(char2)<=40: score =score +1 scorepro.clear() scorepro.write(score, font=("arial",26,"bold")) atay.write(" :נקודות", font=("arial",30,"bold")) if score>=1: maza.st() maza1.st() maza2.st() maza3.st() if maza.distance(char2)<=60 or maza1.distance(char2)<=60 or maza2.distance(char2)<=60 or maza3.distance(char2)<=60: score =score +1 scorepro.clear() scorepro.write(score, font=("arial",26,"bold")) atay.write(" :נקודות", font=("arial",30,"bold")) if score >=1: t=1 screen.bgpic("aassa.jpg") char1.speed(0) y=1000 char1.goto(x,y) maza.st() maza.goto(x1,y1) maza1.st() maza1.goto(x2,y2) maza2.st() maza2.goto(x3,y3) maza3.st() maza3.goto(x4,y4)